package com.iplant.basic.service.po.fmc;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;

@DBBasePO(TableName = "fmc_workarea", CheckName = {"Code", "WorkshopID,Name"}, CodeAuto = true, CodePrefix = "GQ-",Cache = true)
public class FMCWorkArea extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    @DBCondition
    @DBField
    public int WorkshopID = 0;
    @DBJoin(name = "Name", tableName = "fmc_workshop", tableAsName = "w1", Schemas = DBSchemas.Basic, MainTableField
            = "WorkshopID")
    public String WorkshopName = "";

    @DBJoin(name = "Code", tableName = "fmc_workshop", tableAsName = "w1", Schemas = DBSchemas.Basic, MainTableField
            = "WorkshopID")
    public String WorkshopCode = "";

    @DBCondition
    @DBJoin(name = "FactoryID", tableName = "fmc_workshop", tableAsName = "w1", Schemas = DBSchemas.Basic,
            MainTableField = "WorkshopID")
    public int FactoryID = 0;

    @DBJoin(name = "Code", tableName = "fmc_factory", tableAsName = "f1", JoinIndex = 2, Schemas = DBSchemas.Basic,
            ConditionalJoin = "w1.FactoryID=f1.ID")
    public String FactoryCode = "";

    @DBJoin(name = "Name", tableName = "fmc_factory", tableAsName = "f1", JoinIndex = 2, Schemas = DBSchemas.Basic,
            ConditionalJoin = "w1.FactoryID=f1.ID")
    public String FactoryName = "";
    @DBField(Insert = false,ValueAuto = true)
    public int SequenceNo = 0;

    @JsonProperty("SequenceNo")
    public int getSequenceNo() {
        return SequenceNo;
    }

    public void setSequenceNo(int sequenceNo) {
        SequenceNo = sequenceNo;
    }

    @JsonProperty("FactoryID")
    public int getFactoryID() {
        return FactoryID;
    }

    public void setFactoryID(int factoryID) {
        FactoryID = factoryID;
    }

    @JsonProperty("FactoryCode")
    public String getFactoryCode() {
        return FactoryCode;
    }

    public void setFactoryCode(String factoryCode) {
        FactoryCode = factoryCode;
    }

    @JsonProperty("FactoryName")
    public String getFactoryName() {
        return FactoryName;
    }

    public void setFactoryName(String factoryName) {
        FactoryName = factoryName;
    }

    @JsonProperty("WorkshopID")
    public int getWorkshopID() {
        return WorkshopID;
    }

    public void setWorkshopID(int workshopID) {
        WorkshopID = workshopID;
    }

    @JsonProperty("WorkshopName")
    public String getWorkshopName() {
        return WorkshopName;
    }

    public void setWorkshopName(String workshopName) {
        WorkshopName = workshopName;
    }

    @JsonProperty("WorkshopCode")
    public String getWorkshopCode() {
        return WorkshopCode;
    }

    public void setWorkshopCode(String workshopCode) {
        WorkshopCode = workshopCode;
    }


}
